package com.yang.newCustomersTransferBackProcess.controller;

import com.yang.newCustomersTransferBackProcess.service.RideRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class RideRecordController {

    @Autowired
    private RideRecordService rideRecordService;

    @PostMapping("/byCar")
    public Map<String, Object> byCar(@RequestParam(name = "userId") int userId,
                                     @RequestParam(name = "siteId") int siteId
    ){

        return rideRecordService.byCar(userId, siteId);
    }
}
